<%@ taglib uri="/WEB-INF/bpmapp.tld" prefix="ssp" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>

<table class="zoneFive" width="100%" border="0" cellspacing="0" cellpadding="0" summary="content area">
  <tr>
  <td valign="top" width="100%">
    
  <div class="app_pageTitle"><bean:message bundle="appCommonRes" key="bp.processInstance.list.pageTitle" /></div> 
  
  <div class="app_pageSubtitle">
    <span class="left"><bean:message bundle="appCommonRes" key="bp.processInstance.list.tableTitle" /></span>
    <span class="right">&nbsp;</span>
  </div> 
  <!--end page title area here-->
  
	<div class="blockWrap">
  <!-- Start List here -->
  <table class="dataTable" border="0" cellspacing="1" cellpadding="2" summary="My Process Instances List" width="100%">
    <tr class="listHeader"> 
      <th align="left"><bean:message bundle="appCommonRes" key="bp.process.processInstance.instanceName" /></th>
      <th align="left"><bean:message bundle="appCommonRes" key="bp.process.processInstance.processName" /></th>
      <th align="left"><bean:message bundle="appCommonRes" key="bp.process.processInstance.status" /></th>
      <th align="left"><bean:message bundle="appCommonRes" key="bp.process.processInstance.workflowState" /></th>
      <th align="left"><bean:message bundle="appCommonRes" key="bp.process.processInstance.startDate" /></th>
      <th align="left"><bean:message bundle="appCommonRes" key="bp.process.processInstance.dueDate" /></th>
      <th align="left"><bean:message bundle="appCommonRes" key="bp.process.processInstance.completionDate" /></th>
    </tr>

    <ssp:myProcessInstances id="processInstanceList" toScope="page" 
         sortField="START_DATE" sortOrder="ASC" includeDays="2" inBlockMode="false"/>
         
    <logic:iterate id="processInstanceItem" name="processInstanceList" indexId="index">
    <tr class="<%=index.intValue() % 2 == 0 ? "listEven" : "listOdd"%>">
      <td>
 	    <a href = "<bean:write name='processInstanceItem' property = 'url' />" >
                   <bean:write name="processInstanceItem" property = "name"  /></a>
      </td>

      <td>
        <bean:write name="processInstanceItem" property ="processName" />
      </td>
            
      <td>
        <bean:write name="processInstanceItem" property="applicationState"/>
      </td>

      <td>
        <bean:message bundle="appCommonRes" name="processInstanceItem" property="status"/>
      </td>

      <td>
        <bean:write bundle="appCommonRes" name="processInstanceItem" property ="launchDate" formatKey="format.datetime.medium"/>        
      </td>

      <td>
        <bean:write bundle="appCommonRes" name="processInstanceItem" property ="dueDate" formatKey="format.datetime.medium"/>        
      </td>

      <td>
        <bean:write bundle="appCommonRes" name="processInstanceItem" property ="completionDate" formatKey="format.datetime.medium"/>        
      </td>
    </tr>
    </logic:iterate>

  </table>
  </div>
  </td>
  </tr>
</table>
  
<!-- End My process instances page -->
